﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FinanceBatchConfirm.aspx.cs" Inherits="H2.NET.Web.Pages.SMD.FinanceBatchConfirm" %>

<%@ Register Src="../../Controls/DwzAssessment.ascx" TagName="DwzAssessment" TagPrefix="uc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
<head runat="server">
    <title>保证金批量确认</title>
    <link href="../../Resource/jBox/Blue/jbox.css" rel="stylesheet" type="text/css" />
    <link href="../../Resource/Css/Style.css" rel="stylesheet" type="text/css" />
    <script src="../../Resource/dwz/js/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="../../Resource/Js/Common.js" type="text/javascript"></script>
    <script src="../../Resource/Js/Validform_v5.3.2.js" type="text/javascript"></script>
    <script src="../../Resource/Js/jquery.money.js" type="text/javascript"></script>
        <script src="../../Resource/jBox/jquery.jBox-2.3.min.js" type="text/javascript"></script>
    <script src="../../Resource/jBox/jquery.jBox-zh-CN.js" type="text/javascript"></script>
    <style type="text/css">
        #ass_table th { width:15%; }
        #ass_table td { width:85%; }
        .formTable input.ci { width:94%; height:100%; }
    </style>
    <script type="text/javascript">
        $(function () {
            $.cashInput();

            //$("#form1").Validform();
        });

        /* 提交表单 st */
        function confirmSubmit() {
            if (window.confirm("确认要提交吗？")) {
                $.jBox.tip('正在处理，请稍等...', 'loading');
                return true;
            }
            return false;
        }
        /* 提交表单 ed */
        function openAttDialog(process,incident) {
            $.jBox("get:DownloadList.aspx?process="+process+"&incident="+incident, {
                title: "打开附件列表",
                width: 650,
                height: 500,
                buttons: {}
            });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="flowpage">
            <!-- 标题 st -->
            <div class="ffh">
                <table style="width: 100%;">
                    <tr>
                        <td class="logo">
                            <img alt="" src="../../Resource/Images/Logo_AkzoNobel.gif" />
                        </td>
                        <td class="title">
                            <b>保证金批量确认</b>
                        </td>
                        <td class="info" align="left">
                            <div>
                                <label>&nbsp;</label>
                            </div>
                            <div>
                                <label>Date：</label>
                                <%=DateTime.Now.ToString("yyyy-MM-dd")%>
                            </div>
                            <div>
                                <label>Applicator：</label>
                                <%=UserAPI.UserFullName%>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
            <!-- 标题 ed -->

            <div class="flowContent">
                <table class="formTable">
                    <thead>
                        <tr>
                            <th style="text-align:center;width:5%">实例号</th>
                            <th style="text-align:center;width:15%">授权号</th>
                            <th style="text-align:center;width:26%">门店名称</th>
                           <!--
                            <th style="text-align:center;width:8%">区域</th>
                            <th style="text-align:center;width:8%">省份</th>
                            <th style="text-align:center;width:8%">城市</th>
                           -->
                            <th style="text-align:center;width:12%">设备保证金</th>
                            <th style="text-align:center;width:12%">SAP Document Number(设备)</th>
                            <th style="text-align:center;width:12%">履约保证金</th>
                            <th style="text-align:center;width:12%">SAP Document Number(履约)</th>
                            <th style="text-align:center;width:6%">附件下载</th>
                        </tr>
                    </thead>        
                    <tbody>
                        <%
                            int i = 1;
                            if (info != null && info.Count > 0)
                            {
                                foreach (var dt in data)
                                {
                        %>
                            <tr>
                                <td style="text-align:center"><%=dt.Incident%>
                                    <input type="hidden" name="Incident" value="<%= dt.Incident %>" />
                                    <input type="hidden" name="StoreID<%=dt.Incident%>" value="<%= dt.StoreId %>" />
                                </td>
                                <td style="text-align:center"><%:dt.AuthID%></td>
                                <td><%:dt.StoreName%></td>
                                <!--
                                <td style="text-align:center"><%:dt.AreaName %></td>
                                <td style="text-align:center"><%:dt.ProvinceName %></td>
                                <td style="text-align:center"><%:dt.CityName %></td>
                                -->
                                <td style="text-align:center"><%=info[dt.ID].Last().StartsWith("ck_") ? info[dt.ID].Last().Split('_')[1] : "/"%></td>
                                <td style="text-align:center"><%=info[dt.ID].Last().StartsWith("ck_") ? "<input type='text' datatype='*' name='SapDeviceNo" + dt.Incident + "' value='' />" : "/"%></td>
                                <td style="text-align:center"><%=info[dt.ID].First() == "ck" ? "<input type='text' class='ci' datatype='*' name='RenovationDeposit" + dt.Incident + "' value='' />" : "/"%></td>
                                <td style="text-align:center"><%=info[dt.ID].First() == "ck" ? "<input type='text' datatype='*' name='SapDocumentNo" + dt.Incident + "' value='' />" : "/"%></td>
                                <td style="text-align:center"><a href="javascript:void(0)" onclick="openAttDialog('<%:dt.Process %>','<%:dt.Incident %>')">下载</a></td>
                            </tr>
                        <%
i++;
                                }
                            }  
                         %>
                    </tbody>
                </table>
                <div class="flowContent">
                    <div id="storegrid" style="margin-bottom:5px;"></div>
                    <table id="ass_table" class="formTable" style="margin-top: 10px;">
                        <tbody>
                            <uc:DwzAssessment ID="DwzAssessment1" runat="server" />
                        </tbody>
                    </table>
                    <div class="flowBtns">
                        <asp:Button ID="Button1" runat="server" CssClass="u-btn" Text="提交(Submit)" OnClientClick="return confirmSubmit();" OnClick="Button1_Click" />
                        <input type="button" class="u-btn u-btn-c4" value="关闭(Close)" onclick="custom_close()" />
                    </div>
                </div>
            </div>
        </div>
    </form>
</body>
</html>